// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PersistentServiceSupport.java

package com.iphaeton.lms.business;

import com.iphaeton.common.helper.Pagination;
import com.iphaeton.exception.BusinessException;
import com.iphaeton.exception.PersistenceException;
import com.iphaeton.persistence.IPersistenceService;
import com.iphaeton.persistence.spring.JdbcPService;
import java.util.List;

public abstract class PersistentServiceSupport {

	public IPersistenceService getHbpservice() {
		return hbpservice;
	}

	public void setHbpservice(IPersistenceService hbpservice) {
		this.hbpservice = hbpservice;
	}

	public JdbcPService getJdbcpservice() {
		return jdbcpservice;
	}

	public void setJdbcpservice(JdbcPService jdbcpservice) {
		this.jdbcpservice = jdbcpservice;
	}

	public List getSpecifiedItems(Pagination pageInfo) throws BusinessException {
		if (pageInfo == null)
			throw new BusinessException(
					"null pagination object isn't permitted!");
		List resultList = null;
		try {
			resultList = hbpservice.query(pageInfo.getHqlQueryString(),
					pageInfo.getStartItemPos(), pageInfo.getMaxItemNum());
		} catch (PersistenceException e) {
			e.printStackTrace();
		}
		return resultList;
	}

	public PersistentServiceSupport() {
		hbpservice = null;
		jdbcpservice = null;
	}

	protected IPersistenceService hbpservice;
	protected JdbcPService jdbcpservice;
}
